{include file='common/head'}
<body>
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a >首页</a>
        <a >演示</a>
        <a>
          <cite>匹配抢单</cite>
        </a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="{:url('admin/yuyue/successdakuan')}" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
            <div class="layui-input-inline">
                <select name="zid">
                    <option value="">支付方式</option>
                    <option value="1">微信支付</option>
                    <option value="2">支付宝支付</option>
                    <option value="3">银行卡支付</option>
                </select>
            </div>
            <input type="submit" name="sub" class="layui-btn" value="开始搜索" lay-submit="" lay-filter="sreach">
        </form>
    </div>
    <table class="layui-table">
        <thead>
        <tr >
            <th style="text-align: center">序号</th>
            <th style="text-align: center">订单编号</th>
            <th style="text-align: center">会员账号</th>
            <th style="text-align: center">会员昵称</th>
            <th style="text-align: center">会员信用额度</th>
            <th style="text-align: center">支付类型</th>
            <th style="text-align: center">收款金额</th>
            <th style="text-align: center">打款时间</th>
            <th style="text-align: center">抢单状态</th>
            <th style="text-align: center">操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="yuyue" id="b" key='key' }

        <tr style="text-align: center">
            <td>{$key}</td>
            <td>{$b.indentYuyue.t_number}</td>
            <td>{$b.user_yuyue.u_phone}</td>
            <td>{$b.user_yuyue.u_name}</td>
            <td>{$b.user_yuyue.u_money}元</td>
            <td>{$b.zpayyuyue.z_type}</td>
            <td>{$b.indentYuyue.t_money}元</td>
            <td>{$b.y_createtime}</td>
            <td>{$b.s_type_yuyue.s_type}</td>
            <td class="td-manage">
                <a title="确认收款" href="javascript:;"  onclick="member_stop(this,'{$b.yid},{$b.uid},{$b.tid}')"  class="layui-btn   layui-btn-radius layui-btn-danger layui-btn-sm"><span style="color: #EFEEF0">确认收款</span>
                </a>
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
    <div class="page">
        <div>
            {$page}
        </div>
    </div>

</div>
<script>
</script>
<script>
    function member_stop(obj,id){
        layer.confirm('确认要交易成功吗？',function(index){
            var sid=id;
            var sid=id.split(',');
            var yid=sid['0'];
            var uid=sid['1'];
            var tid=sid['2'];
            $.ajax({
                url:'{:URL("yuyue/successupdate")}',
                data:{yid:yid,uid:uid,tid:tid},
                type:'post',
                dataType:'json',
                success:function(msg){
                    if(msg==1){
                        layer.msg('交易成功',{icon: 1,time:6000});
                        window.location.reload();//刷新父级窗口
                    }
                }
            });
        });
    }
    function member_stop2(obj,id){
        layer.confirm('确认已收到款吗？',function(index){
            var sid=id;
            var sid=id.split(',');
            var yid=sid['0'];
            var uid=sid['1'];
            var tid=sid['2'];
            $.ajax({
                url:'{:URL("yuyue/updatesk")}',
                data:{yid:yid,uid:uid,tid:tid},
                type:'post',
                dataType:'json',
                success:function(msg){
                    if(msg==1){
                        layer.msg('收款成功',{icon: 1,time:6000});
                        window.location.reload();//刷新父级窗口
                    }
                }
            });
        });
    }
</script>

</body>

</html>